/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: andres orellana
 * License Type: Evaluation
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class LogDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression log_id;
	public final StringExpression log_fecha;
	public final IntegerExpression log_contador;
	public final IntegerExpression log_resultado;
	
	public LogDetachedCriteria() {
		super(orm.Log.class, orm.LogCriteria.class);
		log_id = new IntegerExpression("log_id", this.getDetachedCriteria());
		log_fecha = new StringExpression("log_fecha", this.getDetachedCriteria());
		log_contador = new IntegerExpression("log_contador", this.getDetachedCriteria());
		log_resultado = new IntegerExpression("log_resultado", this.getDetachedCriteria());
	}
	
	public LogDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.LogCriteria.class);
		log_id = new IntegerExpression("log_id", this.getDetachedCriteria());
		log_fecha = new StringExpression("log_fecha", this.getDetachedCriteria());
		log_contador = new IntegerExpression("log_contador", this.getDetachedCriteria());
		log_resultado = new IntegerExpression("log_resultado", this.getDetachedCriteria());
	}
	
	public ClienteDetachedCriteria createClientecliCriteria() {
		return new ClienteDetachedCriteria(createCriteria("clientecli"));
	}
	
	public Log uniqueLog(PersistentSession session) {
		return (Log) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Log[] listLog(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Log[]) list.toArray(new Log[list.size()]);
	}
}

